package itsm.isperp.module.repository.individuation;

import itsm.isperp.framework.data.mybatis.dao.CUDMapper;
import itsm.isperp.module.dto.incident.IcdIncidentPropertyDTO;
import itsm.isperp.module.entity.individuation.IddIndividuationProperty;

import java.util.List;

import org.springframework.stereotype.Repository;

/**
 * 数据访问
 * 
 * @author lizx
 * @date 2016-07-21 18:06
 */
@Repository
public interface IddIndividuationPropertyMapper extends
		CUDMapper<IddIndividuationProperty> {

	List<IddIndividuationProperty> findByRelationId(String relationId);

	void deleteByRelationId(String relationId);
	
	void deleteByRelationIdAndCategoryPropertyId(String relationId,String categoryPropertyId);
	

	IddIndividuationProperty findByRelationIdAndPropertyId(String relationId,
			String propertyId);

	List<IddIndividuationProperty> findByRelationIdAndPropertyIds(String relationId,
			String[] propertyIds);

	List<IcdIncidentPropertyDTO> findDetailByRelationId(String relationId);

	void deleteByRelationIdAndProperties(String relationId,
			List<IddIndividuationProperty> properties);

	List<IddIndividuationProperty> findByRelationIdsAndPropertyId(
			String[] relationIdArr, String propertyId);

}
